// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using Elastic.Transport.Products.Elasticsearch;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Security;

public sealed partial class CreateApiKeyResponse : ElasticsearchResponse
{
	/// <summary>
	/// <para>
	/// Generated API key.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("api_key")]
	public string ApiKey { get; init; }

	/// <summary>
	/// <para>
	/// API key credentials which is the base64-encoding of
	/// the UTF-8 representation of <c>id</c> and <c>api_key</c> joined
	/// by a colon (<c>:</c>).
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("encoded")]
	public string Encoded { get; init; }

	/// <summary>
	/// <para>
	/// Expiration in milliseconds for the API key.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("expiration")]
	public long? Expiration { get; init; }

	/// <summary>
	/// <para>
	/// Unique ID for this API key.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("id")]
	public string Id { get; init; }

	/// <summary>
	/// <para>
	/// Specifies the name for this API key.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("name")]
	public string Name { get; init; }
}